.class public final Lnbisdk/x;
.super Lnbisdk/en;


# annotations
.annotation system Ldalvik/annotation/MemberClasses;
    value = {
        Lnbisdk/x$a;
    }
.end annotation


# instance fields
.field private lS:Lnbisdk/k;

.field private lT:Lnbisdk/id;

.field private lU:Lnbisdk/x$a;

.field private lV:J


# direct methods
.method protected constructor <init>(Lcom/nbi/common/NBIContext;Ljava/lang/String;Lnbisdk/lf;Lnbisdk/cd;)V
    .locals 7

    invoke-direct {p0, p1, p2, p3, p4}, Lnbisdk/en;-><init>(Lcom/nbi/common/NBIContext;Ljava/lang/String;Lnbisdk/lf;Lnbisdk/cd;)V

    const/4 v0, 0x0

    iput-boolean v0, p0, Lnbisdk/x;->wI:Z

    const/4 v0, 0x1

    iput-boolean v0, p0, Lnbisdk/x;->wJ:Z

    invoke-virtual {p0}, Lnbisdk/x;->getCenter()Lcom/nbi/map/data/Coordinates;

    move-result-object v0

    new-instance v1, Lnbisdk/id;

    new-instance v2, Lnbisdk/cs;

    invoke-virtual {v0}, Lcom/nbi/map/data/Coordinates;->getLatitude()D

    move-result-wide v3

    invoke-virtual {v0}, Lcom/nbi/map/data/Coordinates;->getLongitude()D

    move-result-wide v5

    invoke-direct {v2, v3, v4, v5, v6}, Lnbisdk/cs;-><init>(DD)V

    invoke-direct {v1, v2}, Lnbisdk/id;-><init>(Lnbisdk/br;)V

    iput-object v1, p0, Lnbisdk/x;->lT:Lnbisdk/id;

    iget-object v0, p0, Lnbisdk/x;->lT:Lnbisdk/id;

    const-string v1, "d"

    invoke-virtual {v0, v1}, Lnbisdk/id;->N(Ljava/lang/String;)V

    iget-object v0, p0, Lnbisdk/x;->lT:Lnbisdk/id;

    const/16 v1, 0x4b

    invoke-virtual {v0, v1}, Lnbisdk/id;->S(I)V

    invoke-virtual {p1}, Lcom/nbi/common/NBIContext;->getInternalObject()Ljava/lang/Object;

    new-instance v0, Lnbisdk/im;

    new-instance v1, Lnbisdk/x$1;

    invoke-direct {v1, p0}, Lnbisdk/x$1;-><init>(Lnbisdk/x;)V

    invoke-direct {v0, v1}, Lnbisdk/im;-><init>(Lnbisdk/ae;)V

    invoke-static {}, Lnbisdk/bl;->gR()Lcom/navbuilder/nb/f;

    move-result-object v1

    new-instance v2, Lnbisdk/ku;

    invoke-direct {v2, v0}, Lnbisdk/ku;-><init>(Lnbisdk/mg;)V

    if-eqz v1, :cond_0

    invoke-virtual {v1}, Lcom/navbuilder/nb/f;->isValid()Z

    move-result v0

    if-nez v0, :cond_1

    :cond_0
    new-instance v0, Ljava/lang/IllegalArgumentException;

    const-string v1, "Invalid Context"

    invoke-direct {v0, v1}, Ljava/lang/IllegalArgumentException;-><init>(Ljava/lang/String;)V

    throw v0

    :cond_1
    if-nez v2, :cond_2

    new-instance v0, Ljava/lang/IllegalArgumentException;

    const-string v1, "listener cannot be null"

    invoke-direct {v0, v1}, Ljava/lang/IllegalArgumentException;-><init>(Ljava/lang/String;)V

    throw v0

    :cond_2
    new-instance v0, Lnbisdk/ii;

    invoke-direct {v0, v2}, Lnbisdk/ii;-><init>(Lnbisdk/ae;)V

    iput-object v0, p0, Lnbisdk/x;->lS:Lnbisdk/k;

    return-void
.end method

.method static synthetic a(Lnbisdk/x;)Lnbisdk/k;
    .locals 1

    iget-object v0, p0, Lnbisdk/x;->lS:Lnbisdk/k;

    return-object v0
.end method

.method static synthetic a(Lnbisdk/x;Lnbisdk/x$a;)Lnbisdk/x$a;
    .locals 1

    const/4 v0, 0x0

    iput-object v0, p0, Lnbisdk/x;->lU:Lnbisdk/x$a;

    return-object v0
.end method

.method static synthetic a(Lnbisdk/x;Lnbisdk/ek;Lnbisdk/k;)V
    .locals 6

    const/4 v5, 0x0

    iget-object v0, p0, Lnbisdk/x;->lT:Lnbisdk/id;

    invoke-virtual {v0}, Lnbisdk/id;->et()Ljava/lang/String;

    move-result-object v0

    const-string v1, "more"

    if-eq v0, v1, :cond_0

    invoke-virtual {p0}, Lnbisdk/x;->removeAllPins()V

    :cond_0
    invoke-static {}, Ljava/lang/System;->currentTimeMillis()J

    move-result-wide v0

    iput-wide v0, p0, Lnbisdk/x;->lV:J

    invoke-virtual {p1}, Lnbisdk/ek;->getResultCount()I

    move-result v0

    move v1, v5

    :goto_0
    if-ge v1, v0, :cond_1

    invoke-virtual {p1, v1}, Lnbisdk/ek;->R(I)Lnbisdk/ig;

    move-result-object v2

    invoke-virtual {v2}, Lnbisdk/ig;->gy()Lnbisdk/pp;

    move-result-object v2

    const/16 v3, 0x9

    invoke-virtual {v2}, Lnbisdk/pp;->getSeverity()I

    move-result v4

    packed-switch v4, :pswitch_data_0

    :goto_1
    :pswitch_0
    invoke-virtual {v2}, Lnbisdk/pp;->getRoad()Ljava/lang/String;

    move-result-object v4

    invoke-virtual {v2, v4}, Lnbisdk/pp;->setName(Ljava/lang/String;)V

    new-instance v4, Lnbisdk/pz;

    invoke-direct {v4, v3, v2}, Lnbisdk/pz;-><init>(ILnbisdk/pp;)V

    invoke-virtual {v2}, Lnbisdk/pp;->getType()I

    move-result v2

    packed-switch v2, :pswitch_data_1

    const-string v2, "Miscellaneous Event"

    invoke-virtual {v4, v2}, Lnbisdk/pz;->setSubTitle(Ljava/lang/String;)V

    :goto_2
    const/4 v2, 0x1

    invoke-virtual {p0, v4, v5, v5, v2}, Lnbisdk/x;->a(Lcom/nbi/map/android/Pin;ZZZ)I

    :pswitch_1
    add-int/lit8 v1, v1, 0x1

    goto :goto_0

    :pswitch_2
    const/16 v3, 0xb

    goto :goto_1

    :pswitch_3
    const/16 v3, 0xa

    goto :goto_1

    :pswitch_4
    const-string v2, "Accident"

    invoke-virtual {v4, v2}, Lnbisdk/pz;->setSubTitle(Ljava/lang/String;)V

    goto :goto_2

    :pswitch_5
    const-string v2, "Congestion"

    invoke-virtual {v4, v2}, Lnbisdk/pz;->setSubTitle(Ljava/lang/String;)V

    goto :goto_2

    :pswitch_6
    const-string v2, "Disabled Vehicle"

    invoke-virtual {v4, v2}, Lnbisdk/pz;->setSubTitle(Ljava/lang/String;)V

    goto :goto_2

    :pswitch_7
    const-string v2, "Road Hazard"

    invoke-virtual {v4, v2}, Lnbisdk/pz;->setSubTitle(Ljava/lang/String;)V

    goto :goto_2

    :pswitch_8
    const-string v2, "Unscheduled Construction"

    invoke-virtual {v4, v2}, Lnbisdk/pz;->setSubTitle(Ljava/lang/String;)V

    goto :goto_2

    :pswitch_9
    const-string v2, "Construction"

    invoke-virtual {v4, v2}, Lnbisdk/pz;->setSubTitle(Ljava/lang/String;)V

    goto :goto_2

    :pswitch_a
    const-string v2, "Planned Event"

    invoke-virtual {v4, v2}, Lnbisdk/pz;->setSubTitle(Ljava/lang/String;)V

    goto :goto_2

    :pswitch_b
    const-string v2, "Mass Transit"

    invoke-virtual {v4, v2}, Lnbisdk/pz;->setSubTitle(Ljava/lang/String;)V

    goto :goto_2

    :pswitch_c
    const-string v2, "Other News"

    invoke-virtual {v4, v2}, Lnbisdk/pz;->setSubTitle(Ljava/lang/String;)V

    goto :goto_2

    :cond_1
    invoke-virtual {p0}, Lnbisdk/x;->ib()Lcom/nbi/map/data/Rectangle;

    move-result-object v0

    invoke-virtual {p0, p0, v0}, Lnbisdk/x;->a(Lnbisdk/lf;Lcom/nbi/map/data/Rectangle;)V

    invoke-virtual {p1}, Lnbisdk/ek;->hasMoreResults()Z

    move-result v0

    if-eqz v0, :cond_2

    invoke-virtual {p0}, Lnbisdk/x;->size()I

    move-result v0

    const/16 v1, 0x4b

    if-ge v0, v1, :cond_2

    iget-object v0, p0, Lnbisdk/x;->lT:Lnbisdk/id;

    const-string v1, "more"

    invoke-virtual {v0, v1}, Lnbisdk/id;->O(Ljava/lang/String;)V

    iget-object v0, p0, Lnbisdk/x;->lT:Lnbisdk/id;

    invoke-virtual {p2, v0}, Lnbisdk/k;->a(Lnbisdk/id;)V

    :cond_2
    return-void

    nop

    :pswitch_data_0
    .packed-switch -0x1
        :pswitch_1
        :pswitch_2
        :pswitch_3
        :pswitch_0
        :pswitch_0
    .end packed-switch

    :pswitch_data_1
    .packed-switch 0x1
        :pswitch_4
        :pswitch_5
        :pswitch_6
        :pswitch_7
        :pswitch_8
        :pswitch_9
        :pswitch_a
        :pswitch_b
        :pswitch_c
    .end packed-switch
.end method


# virtual methods
.method public final a(Landroid/graphics/Canvas;Lcom/nbi/map/data/Rectangle;Z)V
    .locals 1

    invoke-virtual {p0}, Lnbisdk/x;->isVisible()Z

    move-result v0

    if-nez v0, :cond_1

    :cond_0
    :goto_0
    return-void

    :cond_1
    invoke-virtual {p0}, Lnbisdk/x;->aH()Z

    move-result v0

    if-eqz v0, :cond_0

    invoke-virtual {p0}, Lnbisdk/x;->aE()Lnbisdk/co;

    move-result-object v0

    invoke-virtual {v0}, Lnbisdk/co;->isAnimating()Z

    move-result v0

    if-nez v0, :cond_0

    invoke-super {p0, p1, p2, p3}, Lnbisdk/en;->a(Landroid/graphics/Canvas;Lcom/nbi/map/data/Rectangle;Z)V

    goto :goto_0
.end method

.method public final b(Landroid/graphics/Canvas;Lcom/nbi/map/data/Rectangle;Z)V
    .locals 1

    invoke-virtual {p0}, Lnbisdk/x;->aH()Z

    move-result v0

    if-nez v0, :cond_0

    :goto_0
    return-void

    :cond_0
    invoke-super {p0, p1, p2, p3}, Lnbisdk/en;->b(Landroid/graphics/Canvas;Lcom/nbi/map/data/Rectangle;Z)V

    goto :goto_0
.end method

.method public final destroy()V
    .locals 1

    const/4 v0, 0x0

    iput-object v0, p0, Lnbisdk/x;->lS:Lnbisdk/k;

    invoke-super {p0}, Lnbisdk/en;->destroy()V

    return-void
.end method

.method protected final e(Z)V
    .locals 12

    const/4 v7, 0x2

    const/4 v11, 0x1

    const/4 v10, 0x0

    invoke-virtual {p0}, Lnbisdk/x;->isVisible()Z

    move-result v0

    if-eqz v0, :cond_0

    invoke-virtual {p0}, Lnbisdk/x;->aH()Z

    move-result v0

    if-nez v0, :cond_1

    :cond_0
    :goto_0
    return-void

    :cond_1
    invoke-virtual {p0}, Lnbisdk/x;->aH()Z

    move-result v0

    if-nez v0, :cond_2

    move v0, v10

    :goto_1
    if-eqz v0, :cond_0

    invoke-virtual {p0}, Lnbisdk/x;->getCenter()Lcom/nbi/map/data/Coordinates;

    move-result-object v8

    invoke-virtual {v8}, Lcom/nbi/map/data/Coordinates;->getLatitude()D

    move-result-wide v0

    invoke-virtual {v8}, Lcom/nbi/map/data/Coordinates;->getLongitude()D

    move-result-wide v2

    new-instance v9, Lnbisdk/x$a;

    invoke-direct {v9}, Lnbisdk/x$a;-><init>()V

    new-instance v4, Lnbisdk/cs;

    invoke-direct {v4, v0, v1, v2, v3}, Lnbisdk/cs;-><init>(DD)V

    new-array v6, v7, [D

    new-array v7, v7, [D

    const-wide v4, 0x4113a53333333333L

    invoke-static/range {v0 .. v7}, Lnbisdk/kv;->a(DDD[D[D)V

    new-instance v0, Lnbisdk/cs;

    aget-wide v1, v6, v10

    aget-wide v3, v6, v11

    invoke-direct {v0, v1, v2, v3, v4}, Lnbisdk/cs;-><init>(DD)V

    iput-object v0, v9, Lnbisdk/x$a;->sN:Lnbisdk/cs;

    new-instance v0, Lnbisdk/cs;

    aget-wide v1, v7, v10

    aget-wide v3, v7, v11

    invoke-direct {v0, v1, v2, v3, v4}, Lnbisdk/cs;-><init>(DD)V

    iput-object v0, v9, Lnbisdk/x$a;->sO:Lnbisdk/cs;

    iput-object v9, p0, Lnbisdk/x;->lU:Lnbisdk/x$a;

    iget-object v0, p0, Lnbisdk/x;->lT:Lnbisdk/id;

    new-instance v1, Lnbisdk/cs;

    invoke-virtual {v8}, Lcom/nbi/map/data/Coordinates;->getLatitude()D

    move-result-wide v2

    invoke-virtual {v8}, Lcom/nbi/map/data/Coordinates;->getLongitude()D

    move-result-wide v4

    invoke-direct {v1, v2, v3, v4, v5}, Lnbisdk/cs;-><init>(DD)V

    invoke-virtual {v0, v1}, Lnbisdk/id;->a(Lnbisdk/br;)V

    iget-object v0, p0, Lnbisdk/x;->lT:Lnbisdk/id;

    iget-object v1, p0, Lnbisdk/x;->lU:Lnbisdk/x$a;

    iget-object v1, v1, Lnbisdk/x$a;->sN:Lnbisdk/cs;

    iget-object v2, p0, Lnbisdk/x;->lU:Lnbisdk/x$a;

    iget-object v2, v2, Lnbisdk/x$a;->sO:Lnbisdk/cs;

    invoke-virtual {v0, v1, v2}, Lnbisdk/id;->a(Lnbisdk/cs;Lnbisdk/cs;)V

    iget-object v0, p0, Lnbisdk/x;->lT:Lnbisdk/id;

    const-string v1, "screen"

    invoke-virtual {v0, v1}, Lnbisdk/id;->O(Ljava/lang/String;)V

    iget-object v0, p0, Lnbisdk/x;->lS:Lnbisdk/k;

    iget-object v1, p0, Lnbisdk/x;->lT:Lnbisdk/id;

    invoke-virtual {v0, v1}, Lnbisdk/k;->a(Lnbisdk/id;)V

    goto :goto_0

    :cond_2
    iget-object v0, p0, Lnbisdk/x;->lS:Lnbisdk/k;

    invoke-virtual {v0}, Lnbisdk/k;->isRequestInProgress()Z

    move-result v0

    if-eqz v0, :cond_3

    move v0, v10

    goto :goto_1

    :cond_3
    invoke-static {}, Ljava/lang/System;->currentTimeMillis()J

    move-result-wide v0

    iget-wide v2, p0, Lnbisdk/x;->lV:J

    sub-long/2addr v0, v2

    const-wide/32 v2, 0x493e0

    cmp-long v0, v0, v2

    if-gez v0, :cond_4

    move v0, v11

    :goto_2
    if-eqz v0, :cond_7

    iget-object v0, p0, Lnbisdk/x;->lU:Lnbisdk/x$a;

    if-eqz v0, :cond_5

    move v0, v11

    :goto_3
    if-eqz v0, :cond_7

    invoke-virtual {p0}, Lnbisdk/x;->getCenter()Lcom/nbi/map/data/Coordinates;

    move-result-object v2

    invoke-virtual {v2}, Lcom/nbi/map/data/Coordinates;->getLatitude()D

    move-result-wide v0

    invoke-virtual {v2}, Lcom/nbi/map/data/Coordinates;->getLongitude()D

    move-result-wide v2

    invoke-virtual {p0}, Lnbisdk/x;->ai()Lnbisdk/kr;

    move-result-object v4

    invoke-virtual {p0}, Lnbisdk/x;->ib()Lcom/nbi/map/data/Rectangle;

    move-result-object v5

    invoke-static/range {v0 .. v5}, Lnbisdk/x$a;->a(DDLnbisdk/kr;Lcom/nbi/map/data/Rectangle;)Lnbisdk/x$a;

    move-result-object v0

    iget-object v1, p0, Lnbisdk/x;->lU:Lnbisdk/x$a;

    iget-object v2, v0, Lnbisdk/x$a;->sN:Lnbisdk/cs;

    invoke-virtual {v2}, Lnbisdk/cs;->getLatitude()D

    move-result-wide v2

    iget-object v4, v1, Lnbisdk/x$a;->sN:Lnbisdk/cs;

    invoke-virtual {v4}, Lnbisdk/cs;->getLatitude()D

    move-result-wide v4

    cmpg-double v2, v2, v4

    if-gtz v2, :cond_6

    iget-object v2, v0, Lnbisdk/x$a;->sN:Lnbisdk/cs;

    invoke-virtual {v2}, Lnbisdk/cs;->getLongitude()D

    move-result-wide v2

    iget-object v4, v1, Lnbisdk/x$a;->sN:Lnbisdk/cs;

    invoke-virtual {v4}, Lnbisdk/cs;->getLongitude()D

    move-result-wide v4

    cmpl-double v2, v2, v4

    if-ltz v2, :cond_6

    iget-object v2, v0, Lnbisdk/x$a;->sO:Lnbisdk/cs;

    invoke-virtual {v2}, Lnbisdk/cs;->getLatitude()D

    move-result-wide v2

    iget-object v4, v1, Lnbisdk/x$a;->sO:Lnbisdk/cs;

    invoke-virtual {v4}, Lnbisdk/cs;->getLatitude()D

    move-result-wide v4

    cmpl-double v2, v2, v4

    if-ltz v2, :cond_6

    iget-object v0, v0, Lnbisdk/x$a;->sO:Lnbisdk/cs;

    invoke-virtual {v0}, Lnbisdk/cs;->getLongitude()D

    move-result-wide v2

    iget-object v0, v1, Lnbisdk/x$a;->sO:Lnbisdk/cs;

    invoke-virtual {v0}, Lnbisdk/cs;->getLongitude()D

    move-result-wide v0

    cmpg-double v0, v2, v0

    if-gtz v0, :cond_6

    move v0, v11

    :goto_4
    if-eqz v0, :cond_7

    move v0, v10

    goto/16 :goto_1

    :cond_4
    move v0, v10

    goto :goto_2

    :cond_5
    move v0, v10

    goto :goto_3

    :cond_6
    move v0, v10

    goto :goto_4

    :cond_7
    move v0, v11

    goto/16 :goto_1
.end method

.method public final gB()Z
    .locals 1

    invoke-super {p0}, Lnbisdk/en;->gB()Z

    move-result v0

    if-eqz v0, :cond_0

    invoke-virtual {p0}, Lnbisdk/x;->aH()Z

    move-result v0

    if-eqz v0, :cond_0

    const/4 v0, 0x1

    :goto_0
    return v0

    :cond_0
    const/4 v0, 0x0

    goto :goto_0
.end method
